//Class that will take a string of HTML code and parse it into various components
#ifndef HTMLPARSER_H
#define HTMLPARSER_H


#include "../utils/inc/HTMLTokenizer.h"
#include "../utils/inc/HTMLToken.h"
#include "../utils/inc/StringUtil.h"
#include "LinkedList.h"
#include "URL.h"
#include <string>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>

using namespace std;

class HTMLParser{

	private:
		void ParseText(string src, LinkedList<string> &list);
		int ParseDescrtiptionText(string &src, string *dest, int charCount);
		void getFromBody(HTMLTokenizer &tokenizer,string *description,bool stopflag,bool scriptflag);
		void getFromHeader(HTMLTokenizer &tokenizer,string *description,bool stopflag,bool scriptflag);
		void getFromBTitle(HTMLTokenizer &tokenizer,string *description,bool stopflag,bool scriptflag);

	public:

		HTMLParser();
		~HTMLParser();

		string* getDescription(const string *html);
		//Method to output description of website

		LinkedList<string>* getWords(const string *html);
		//Outputs text body of website

		LinkedList<string>* getLinks(const string *html);
		//Outputs url links to other sites

}; 

class NonHTMLFileException{

public:
	NonHTMLFileException(){};
};

#endif
